package com.god530.l01array;

// classDataArray.java
// data items as class object
// to run this program: C>java ClassDataApp
public class Person {

	private String lastName;
	private String firstName;
	private int age;
	
	public Person(String last, String first, int a) {
		lastName = last;
		firstName = first;
		age = a;
	}
	
	//--------------------------------------
	public void displayPerson() {
		System.out.print("   Last name: " + lastName);
		System.out.print(", First name: " + firstName);
		System.out.print(", Age: " + age);
	}
	
	//--------------------------------------
	public String getLast() {   // get last name
		return lastName;
	}
	
//	//---------another class---------------------
//	private Person[] a;    // reference to array
//	private int nElems;    // number of data items
//	
//	
//	
//	public static void main(String[] args) {
//		// TODO Auto-generated method stub
//
//	}

}
